POV-Ray : Newsgroups : povray.general : TGA files containing HF_Gray_16 data, Question 2 : Re: TGA files containing HF_Gray_16 data, Question 2 Server Time
12 Aug 2024 03:30:13 EDT (-0400)
  Re: TGA files containing HF_Gray_16 data, Question 2  
From: Margus Ramst
Date: 5 Apr 1999 09:21:38
Message: <3708AAEC.44254A54@peak.edu.ee>
F.VERBAAS wrote:
> 
> The docs state:
> "The TGA and PPM file formats may be used as a storage device for 16 bit
> numbers rather than an image file. These formats use the red and green bytes
> of each pixel to store the high and low bytes of a height value. "
> 
> When I inspect a POV-generated HF_Gray_16 TGA file I find the red channel
> all zero, but green and blue channels containing the high order and low
> order bytes respectively.
> 
> Could it be that the docs differ from the code?
> 
> Frans

TGA and BMP have color bytes in BGR order, if I'm not mistaken. I'm not
familiar with the PPM format, but I suspect the same applies. Also, the pixel
order in BMP/TGA is from bottom left to top right.
I'm not sure what header bytes define the file as a HF_16 TGA, possibly a
non-standard number in the color depth byte. Should be quite easy to find out,
if you need it.

Margus


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.